proc rec-ack-event {n} {
}

proc rec-terminate {n} {
   exit 0
}



proc create {} {
   frame .w

   wm title . "Variable Inspector"

   text .w.text \
      -yscrollcommand ".w.vs set" \
      -relief ridge \
      -bd 1 \
      -width 25

   scrollbar .w.vs\
      -orient vertical \
      -command ".w.text yview"

   pack .w.text \
      -side left \
      -fill both \
      -expand 1

   pack .w.vs \
        -side right \
        -fill both

   pack .w -fill both -expand 1
   .w.text configure -state disabled
}


proc clear-vars {} {
   .w.text configure -state normal

   .w.text delete 0.0 end
   .w.text configure -state disabled
}


proc set-vars {l} {
   .w.text configure -state normal  
   .w.text delete 0.0 end

   foreach e [TCLstring [TBstring $l]] {
     regexp  {var\((.+),(.+)\)} "$e" tmp name value
      .w.text insert 0.0 "[TCLstring $name] = $value\n"
   }
   .w.text configure -state disabled
}


create
